<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // switch 用法
        switch (5 + 8) {
            case 13:
                alert('找到了');
                break;
            
            case 12:
                alert('找到了');
                break;

            default:
                break;
        }
        var type = prompt('输入想查询的水果');
        switch (type) {
            case 'apple':
                alert('three')
                break
            case 'banana':
                alert('two')
                break
            default:
                alert('nothing')
        }
    </script>
</head>
<body>
    
</body>
</html>